815fe8836fcaea06e67837524a45201e5d7e4964,fabric/fabric-core/src/main/java/io/fabric8/service/KarafContainerRegistration.java,KarafContainerRegistration,configurationEvent,#ConfigurationEvent#,456
Before Change
String protocol = httpsEnabled && !httpEnabled ? "https" : "http";
int httpPort = httpsEnabled && !httpEnabled ? Integer.parseInt((String) config.getProperties().get(HTTPS_BINDING_PORT_KEY)) : Integer
.parseInt((String) config.getProperties().get(HTTP_BINDING_PORT_KEY));
int httpConnectionPort = httpsEnabled && !httpEnabled ? getHttpsConnectionPort(current) : getHttpConnectionPort(current, httpPort);
String httpUrl = getHttpUrl(protocol, karafName, httpConnectionPort);
setData(curator.get(), CONTAINER_HTTP.getPath(karafName), httpUrl);
if (fabricService.get().getPortService().lookupPort(current, HTTP_PID, HTTP_BINDING_PORT_KEY) != httpPort) {
After Change
int httpConnectionPort = -1;
if(httpEnabled){
int httpPort = Integer.parseInt((String) config.getProperties().get(HTTP_BINDING_PORT_KEY));
httpConnectionPort = getHttpConnectionPort(current, httpPort);
if (fabricService.get().getPortService().lookupPort(current, HTTP_PID, HTTP_BINDING_PORT_KEY) != httpPort) {
fabricService.get().getPortService().unregisterPort(current, HTTP_PID, HTTP_BINDING_PORT_KEY);
fabricService.get().getPortService().registerPort(current, HTTP_PID, HTTP_BINDING_PORT_KEY, httpPort);